function resizeVertDiv(oDiv,offset,oWrite){

	if(document.all)var bHeight = document.body.clientHeight;
	else var bHeight = window.innerHeight;
		
	var size = bHeight - offset;
		size=size-30;
	//alert("this is window.innerWidth: " + window.innerWidth);
	//height = window.innerHeight;

	//alert("this is document.body.clientWidth: " + document.body.clientHeight);
	//height = document.body.clientHeight;
    
    document.getElementById(oDiv).style.height = size + "px";
    
    if(oWrite) document.getElementById(oWrite).style.height = size + "px";
}

function wordcount(string) {
	var a = string.split(/\s+/g); // split the sentence into an array of words
	document.getElementById('title').innerHTML = "Word Count: " + a.length;
}

		
function roll(id){

   var objSrc = id.src;
   var ext = (objSrc.indexOf(".gif") != -1) ? ".gif" : ".png";
   var idLength = objSrc.length;

   if(objSrc.indexOf("_over") != -1){
      var path = objSrc.substr(0, idLength - 9);
      id.src = path + ext;
   } else {
      var path = objSrc.substr(0, idLength - 4);
      id.src = path + "_over" + ext;
   }

}




function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}



iState=0;



function checktimer()
{

  var x1=readCookie("timer");

  if (x1== "1")
  {

toggleBox('timeVal');
  }

}
